package cn.topevery.garden.entity.po;

import cn.topevery.garden.framework.base.BaseEntity;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.alibaba.fastjson.annotation.JSONField;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.LocalTime;
import java.math.BigDecimal;
import org.locationtech.jts.geom.Geometry;
import lombok.Data;
import cn.topevery.garden.entity.serializer.GeometrySerializer;

/**
 * 考勤记录
 */
@Data
@DbTable(tableName = "t_person_attendance")
public class PersonAttendance extends BaseEntity {
        /**
     * UUID
     */
    @DbTableField(columnName = "c_entity_id", dbType = DbTypeEnum.VARCHAR)
    public String entityId ;

    /**
     * 日期 
     */
    @DbTableField(columnName = "c_date", dbType = DbTypeEnum.DATE)
    public LocalDate date ;

    /**
     * 用户Id 
     */
    @DbTableField(columnName = "c_user_id", dbType = DbTypeEnum.VARCHAR)
    public String userId ;

    /**
     * 用户名 
     */
    @DbTableField(columnName = "c_user_name", dbType = DbTypeEnum.VARCHAR)
    public String userName ;

    /**
     * 签到
     */
    @DbTableField(columnName = "c_sign_in", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime signIn ;

    /**
     * 签退 
     */
    @DbTableField(columnName = "c_sign_out", dbType = DbTypeEnum.TIMESTAMP)
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    public LocalDateTime signOut ;

    /**
     * 迟到 
     */
    @DbTableField(columnName = "c_sign_in_overtimes", dbType = DbTypeEnum.BIGINT)
    public Long signInOvertimes ;

    /**
     * 早退 
     */
    @DbTableField(columnName = "c_sign_out_overtimes", dbType = DbTypeEnum.BIGINT)
    public Long signOutOvertimes ;

    /**
     * 1 旷工 0 正常
     */
    @DbTableField(columnName = "c_is_empty", dbType = DbTypeEnum.INTEGER)
    public Integer isEmpty ;

    /**
     * 出范围时长 
     */
    @DbTableField(columnName = "c_out_range", dbType = DbTypeEnum.BIGINT)
    public Long outRange ;

    /**
     * 滞留时长 
     */
    @DbTableField(columnName = "c_retention_overtimes", dbType = DbTypeEnum.BIGINT)
    public Long retentionOvertimes ;

    /**
     * 1 正常 0 请假  
     */
    @DbTableField(columnName = "c_is_leave", dbType = DbTypeEnum.INTEGER)
    public Integer isLeave ;

    /**
     * 加班时长
     */
    @DbTableField(columnName = "c_is_overtimes", dbType = DbTypeEnum.BIGINT)
    public Long isOvertimes ;
    /**
     * 1 出勤 0 缺勤
     */
    @DbTableField(columnName = "c_state", dbType = DbTypeEnum.INTEGER)
    public Integer state ;
}
